<?php
$nocache = 'Pragma: no-cache';//不要缓存
header($nocache);
$nocache = 'Cache-Control: no-cache';//不要缓存
header($nocache);
mysql_connect('localhost','root','');
//------------------------------环境，函数，类
//print_r($_POST);
$word=trim($_POST['word']);
if(empty($word)){
	echo '输入为空';
	exit;
}
$sql_sentence = <<<EOBODY
	SELECT  *
	FROM `eng_strai`.`words`
	where `word` like '$word'
EOBODY;
$sql_result = mysql_query($sql_sentence);
$sql_error = mysql_error();//mysql错误提示
echo $sql_error;
$sql_r_n = mysql_num_rows($sql_result);//是否存在

if(!($sql_r_n == 0)){
?>
<table width="200" border="1">
	   <tr>
        <td width="40" >编号</td>
        <td  >单词</td>
    	<td  >读音</td>
    	<td  >优先级</td>
      </tr>
<?
for($i=0;$sql_r_n>$i;$i++){
	$r = mysql_fetch_array($sql_result,MYSQL_ASSOC);
	$info = $r['yb'];
	$word = $r['word'];
	$xs = $r['xs'];
	echo <<<EOBODY
      <tr>
        <td >$i</td>
        <td >$word</td>
        <td class="kk" >$info</td>
        <td >$xs</td>
      </tr>
EOBODY;
}
?>
</table>
<?php
}else{ echo '没有找到';}
?>